\(\int \frac {x^2 (d+e x^3)}{a+b x^3+c x^6} \, dx\) [11]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [B] (verification not implemented)
   Maxima [F(-2)]
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 25, antiderivative size = 72 \[ \int \frac {x^2 \left (d+e x^3\right )}{a+b x^3+c x^6} \, dx=-\frac {(2 c d-b e) \text {arctanh}\left (\frac {b+2 c x^3}{\sqrt {b^2-4 a c}}\right )}{3 c \sqrt {b^2-4 a c}}+\frac {e \log \left (a+b x^3+c x^6\right )}{6 c} \]

[Out]

1/6*e*ln(c*x^6+b*x^3+a)/c-1/3*(-b*e+2*c*d)*arctanh((2*c*x^3+b)/(-4*a*c+b^2)^(1/2))/c/(-4*a*c+b^2)^(1/2)

Rubi [A] (verified)

Time = 0.05 (sec) , antiderivative size = 72, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.200, Rules used = {1482, 648, 632, 212, 642} \[ \int \frac {x^2 \left (d+e x^3\right )}{a+b x^3+c x^6} \, dx=\frac {e \log \left (a+b x^3+c x^6\right )}{6 c}-\frac {(2 c d-b e) \text {arctanh}\left (\frac {b+2 c x^3}{\sqrt {b^2-4 a c}}\right )}{3 c \sqrt {b^2-4 a c}} \]

[In]

Int[(x^2*(d + e*x^3))/(a + b*x^3 + c*x^6),x]

[Out]

-1/3*((2*c*d - b*e)*ArcTanh[(b + 2*c*x^3)/Sqrt[b^2 - 4*a*c]])/(c*Sqrt[b^2 - 4*a*c]) + (e*Log[a + b*x^3 + c*x^6
])/(6*c)

Rule 212

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[-b, 2]))*ArcTanh[Rt[-b, 2]*(x/Rt[a, 2])], x]
 /; FreeQ[{a, b}, x] && NegQ[a/b] && (GtQ[a, 0] || LtQ[b, 0])

Rule 632

Int[((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(-1), x_Symbol] :> Dist[-2, Subst[Int[1/Simp[b^2 - 4*a*c - x^2, x], x]
, x, b + 2*c*x], x] /; FreeQ[{a, b, c}, x] && NeQ[b^2 - 4*a*c, 0]

Rule 642

Int[((d_) + (e_.)*(x_))/((a_.) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> Simp[d*(Log[RemoveContent[a + b*x +
c*x^2, x]]/b), x] /; FreeQ[{a, b, c, d, e}, x] && EqQ[2*c*d - b*e, 0]

Rule 648

Int[((d_.) + (e_.)*(x_))/((a_) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> Dist[(2*c*d - b*e)/(2*c), Int[1/(a +
 b*x + c*x^2), x], x] + Dist[e/(2*c), Int[(b + 2*c*x)/(a + b*x + c*x^2), x], x] /; FreeQ[{a, b, c, d, e}, x] &
& NeQ[2*c*d - b*e, 0] && NeQ[b^2 - 4*a*c, 0] &&  !NiceSqrtQ[b^2 - 4*a*c]

Rule 1482

Int[(x_)^(m_.)*((a_) + (c_.)*(x_)^(n2_.) + (b_.)*(x_)^(n_))^(p_.)*((d_) + (e_.)*(x_)^(n_))^(q_.), x_Symbol] :>
 Dist[1/n, Subst[Int[(d + e*x)^q*(a + b*x + c*x^2)^p, x], x, x^n], x] /; FreeQ[{a, b, c, d, e, m, n, p, q}, x]
 && EqQ[n2, 2*n] && EqQ[Simplify[m - n + 1], 0]

Rubi steps \begin{align*} \text {integral}& = \frac {1}{3} \text {Subst}\left (\int \frac {d+e x}{a+b x+c x^2} \, dx,x,x^3\right ) \\ & = \frac {e \text {Subst}\left (\int \frac {b+2 c x}{a+b x+c x^2} \, dx,x,x^3\right )}{6 c}+\frac {(2 c d-b e) \text {Subst}\left (\int \frac {1}{a+b x+c x^2} \, dx,x,x^3\right )}{6 c} \\ & = \frac {e \log \left (a+b x^3+c x^6\right )}{6 c}-\frac {(2 c d-b e) \text {Subst}\left (\int \frac {1}{b^2-4 a c-x^2} \, dx,x,b+2 c x^3\right )}{3 c} \\ & = -\frac {(2 c d-b e) \tanh ^{-1}\left (\frac {b+2 c x^3}{\sqrt {b^2-4 a c}}\right )}{3 c \sqrt {b^2-4 a c}}+\frac {e \log \left (a+b x^3+c x^6\right )}{6 c} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.04 (sec) , antiderivative size = 71, normalized size of antiderivative = 0.99 \[ \int \frac {x^2 \left (d+e x^3\right )}{a+b x^3+c x^6} \, dx=\frac {-\frac {2 (-2 c d+b e) \arctan \left (\frac {b+2 c x^3}{\sqrt {-b^2+4 a c}}\right )}{\sqrt {-b^2+4 a c}}+e \log \left (a+b x^3+c x^6\right )}{6 c} \]

[In]

Integrate[(x^2*(d + e*x^3))/(a + b*x^3 + c*x^6),x]

[Out]

((-2*(-2*c*d + b*e)*ArcTan[(b + 2*c*x^3)/Sqrt[-b^2 + 4*a*c]])/Sqrt[-b^2 + 4*a*c] + e*Log[a + b*x^3 + c*x^6])/(
6*c)

Maple [A] (verified)

Time = 0.12 (sec) , antiderivative size = 66, normalized size of antiderivative = 0.92

method result size
default \(\frac {e \ln \left (c \,x^{6}+b \,x^{3}+a \right )}{6 c}+\frac {2 \left (d -\frac {b e}{2 c}\right ) \arctan \left (\frac {2 c \,x^{3}+b}{\sqrt {4 a c -b^{2}}}\right )}{3 \sqrt {4 a c -b^{2}}}\) \(66\)
risch \(\frac {2 \ln \left (\left (-4 a b c e +8 a \,c^{2} d +b^{3} e -2 b^{2} c d +\sqrt {-\left (b e -2 c d \right )^{2} \left (4 a c -b^{2}\right )}\, b \right ) x^{3}+2 \sqrt {-\left (b e -2 c d \right )^{2} \left (4 a c -b^{2}\right )}\, a \right ) a e}{3 \left (4 a c -b^{2}\right )}-\frac {\ln \left (\left (-4 a b c e +8 a \,c^{2} d +b^{3} e -2 b^{2} c d +\sqrt {-\left (b e -2 c d \right )^{2} \left (4 a c -b^{2}\right )}\, b \right ) x^{3}+2 \sqrt {-\left (b e -2 c d \right )^{2} \left (4 a c -b^{2}\right )}\, a \right ) b^{2} e}{6 c \left (4 a c -b^{2}\right )}+\frac {\ln \left (\left (-4 a b c e +8 a \,c^{2} d +b^{3} e -2 b^{2} c d +\sqrt {-\left (b e -2 c d \right )^{2} \left (4 a c -b^{2}\right )}\, b \right ) x^{3}+2 \sqrt {-\left (b e -2 c d \right )^{2} \left (4 a c -b^{2}\right )}\, a \right ) \sqrt {-\left (b e -2 c d \right )^{2} \left (4 a c -b^{2}\right )}}{6 c \left (4 a c -b^{2}\right )}+\frac {2 \ln \left (\left (-4 a b c e +8 a \,c^{2} d +b^{3} e -2 b^{2} c d -\sqrt {-\left (b e -2 c d \right )^{2} \left (4 a c -b^{2}\right )}\, b \right ) x^{3}-2 \sqrt {-\left (b e -2 c d \right )^{2} \left (4 a c -b^{2}\right )}\, a \right ) a e}{3 \left (4 a c -b^{2}\right )}-\frac {\ln \left (\left (-4 a b c e +8 a \,c^{2} d +b^{3} e -2 b^{2} c d -\sqrt {-\left (b e -2 c d \right )^{2} \left (4 a c -b^{2}\right )}\, b \right ) x^{3}-2 \sqrt {-\left (b e -2 c d \right )^{2} \left (4 a c -b^{2}\right )}\, a \right ) b^{2} e}{6 c \left (4 a c -b^{2}\right )}-\frac {\ln \left (\left (-4 a b c e +8 a \,c^{2} d +b^{3} e -2 b^{2} c d -\sqrt {-\left (b e -2 c d \right )^{2} \left (4 a c -b^{2}\right )}\, b \right ) x^{3}-2 \sqrt {-\left (b e -2 c d \right )^{2} \left (4 a c -b^{2}\right )}\, a \right ) \sqrt {-\left (b e -2 c d \right )^{2} \left (4 a c -b^{2}\right )}}{6 c \left (4 a c -b^{2}\right )}\) \(671\)

[In]

int(x^2*(e*x^3+d)/(c*x^6+b*x^3+a),x,method=_RETURNVERBOSE)

[Out]

1/6*e*ln(c*x^6+b*x^3+a)/c+2/3*(d-1/2/c*b*e)/(4*a*c-b^2)^(1/2)*arctan((2*c*x^3+b)/(4*a*c-b^2)^(1/2))

Fricas [A] (verification not implemented)

none

Time = 0.33 (sec) , antiderivative size = 216, normalized size of antiderivative = 3.00 \[ \int \frac {x^2 \left (d+e x^3\right )}{a+b x^3+c x^6} \, dx=\left [\frac {{\left (b^{2} - 4 \, a c\right )} e \log \left (c x^{6} + b x^{3} + a\right ) - \sqrt {b^{2} - 4 \, a c} {\left (2 \, c d - b e\right )} \log \left (\frac {2 \, c^{2} x^{6} + 2 \, b c x^{3} + b^{2} - 2 \, a c + {\left (2 \, c x^{3} + b\right )} \sqrt {b^{2} - 4 \, a c}}{c x^{6} + b x^{3} + a}\right )}{6 \, {\left (b^{2} c - 4 \, a c^{2}\right )}}, \frac {{\left (b^{2} - 4 \, a c\right )} e \log \left (c x^{6} + b x^{3} + a\right ) - 2 \, \sqrt {-b^{2} + 4 \, a c} {\left (2 \, c d - b e\right )} \arctan \left (-\frac {{\left (2 \, c x^{3} + b\right )} \sqrt {-b^{2} + 4 \, a c}}{b^{2} - 4 \, a c}\right )}{6 \, {\left (b^{2} c - 4 \, a c^{2}\right )}}\right ] \]

[In]

integrate(x^2*(e*x^3+d)/(c*x^6+b*x^3+a),x, algorithm="fricas")

[Out]

[1/6*((b^2 - 4*a*c)*e*log(c*x^6 + b*x^3 + a) - sqrt(b^2 - 4*a*c)*(2*c*d - b*e)*log((2*c^2*x^6 + 2*b*c*x^3 + b^
2 - 2*a*c + (2*c*x^3 + b)*sqrt(b^2 - 4*a*c))/(c*x^6 + b*x^3 + a)))/(b^2*c - 4*a*c^2), 1/6*((b^2 - 4*a*c)*e*log
(c*x^6 + b*x^3 + a) - 2*sqrt(-b^2 + 4*a*c)*(2*c*d - b*e)*arctan(-(2*c*x^3 + b)*sqrt(-b^2 + 4*a*c)/(b^2 - 4*a*c
)))/(b^2*c - 4*a*c^2)]

Sympy [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 287 vs. \(2 (65) = 130\).

Time = 10.30 (sec) , antiderivative size = 287, normalized size of antiderivative = 3.99 \[ \int \frac {x^2 \left (d+e x^3\right )}{a+b x^3+c x^6} \, dx=\left (\frac {e}{6 c} - \frac {\sqrt {- 4 a c + b^{2}} \left (b e - 2 c d\right )}{6 c \left (4 a c - b^{2}\right )}\right ) \log {\left (x^{3} + \frac {- 12 a c \left (\frac {e}{6 c} - \frac {\sqrt {- 4 a c + b^{2}} \left (b e - 2 c d\right )}{6 c \left (4 a c - b^{2}\right )}\right ) + 2 a e + 3 b^{2} \left (\frac {e}{6 c} - \frac {\sqrt {- 4 a c + b^{2}} \left (b e - 2 c d\right )}{6 c \left (4 a c - b^{2}\right )}\right ) - b d}{b e - 2 c d} \right )} + \left (\frac {e}{6 c} + \frac {\sqrt {- 4 a c + b^{2}} \left (b e - 2 c d\right )}{6 c \left (4 a c - b^{2}\right )}\right ) \log {\left (x^{3} + \frac {- 12 a c \left (\frac {e}{6 c} + \frac {\sqrt {- 4 a c + b^{2}} \left (b e - 2 c d\right )}{6 c \left (4 a c - b^{2}\right )}\right ) + 2 a e + 3 b^{2} \left (\frac {e}{6 c} + \frac {\sqrt {- 4 a c + b^{2}} \left (b e - 2 c d\right )}{6 c \left (4 a c - b^{2}\right )}\right ) - b d}{b e - 2 c d} \right )} \]

[In]

integrate(x**2*(e*x**3+d)/(c*x**6+b*x**3+a),x)

[Out]

(e/(6*c) - sqrt(-4*a*c + b**2)*(b*e - 2*c*d)/(6*c*(4*a*c - b**2)))*log(x**3 + (-12*a*c*(e/(6*c) - sqrt(-4*a*c
+ b**2)*(b*e - 2*c*d)/(6*c*(4*a*c - b**2))) + 2*a*e + 3*b**2*(e/(6*c) - sqrt(-4*a*c + b**2)*(b*e - 2*c*d)/(6*c
*(4*a*c - b**2))) - b*d)/(b*e - 2*c*d)) + (e/(6*c) + sqrt(-4*a*c + b**2)*(b*e - 2*c*d)/(6*c*(4*a*c - b**2)))*l
og(x**3 + (-12*a*c*(e/(6*c) + sqrt(-4*a*c + b**2)*(b*e - 2*c*d)/(6*c*(4*a*c - b**2))) + 2*a*e + 3*b**2*(e/(6*c
) + sqrt(-4*a*c + b**2)*(b*e - 2*c*d)/(6*c*(4*a*c - b**2))) - b*d)/(b*e - 2*c*d))

Maxima [F(-2)]

Exception generated. \[ \int \frac {x^2 \left (d+e x^3\right )}{a+b x^3+c x^6} \, dx=\text {Exception raised: ValueError} \]

[In]

integrate(x^2*(e*x^3+d)/(c*x^6+b*x^3+a),x, algorithm="maxima")

[Out]

Exception raised: ValueError >> Computation failed since Maxima requested additional constraints; using the 'a
ssume' command before evaluation *may* help (example of legal syntax is 'assume(4*a*c-b^2>0)', see `assume?` f
or more deta

Giac [A] (verification not implemented)

none

Time = 0.43 (sec) , antiderivative size = 68, normalized size of antiderivative = 0.94 \[ \int \frac {x^2 \left (d+e x^3\right )}{a+b x^3+c x^6} \, dx=\frac {e \log \left (c x^{6} + b x^{3} + a\right )}{6 \, c} + \frac {{\left (2 \, c d - b e\right )} \arctan \left (\frac {2 \, c x^{3} + b}{\sqrt {-b^{2} + 4 \, a c}}\right )}{3 \, \sqrt {-b^{2} + 4 \, a c} c} \]

[In]

integrate(x^2*(e*x^3+d)/(c*x^6+b*x^3+a),x, algorithm="giac")

[Out]

1/6*e*log(c*x^6 + b*x^3 + a)/c + 1/3*(2*c*d - b*e)*arctan((2*c*x^3 + b)/sqrt(-b^2 + 4*a*c))/(sqrt(-b^2 + 4*a*c
)*c)

Mupad [B] (verification not implemented)

Time = 11.27 (sec) , antiderivative size = 1632, normalized size of antiderivative = 22.67 \[ \int \frac {x^2 \left (d+e x^3\right )}{a+b x^3+c x^6} \, dx=\text {Too large to display} \]

[In]

int((x^2*(d + e*x^3))/(a + b*x^3 + c*x^6),x)

[Out]

- (log(a + b*x^3 + c*x^6)*(3*b^2*e - 12*a*c*e))/(2*(36*a*c^2 - 9*b^2*c)) - (atan((b*(4*a*c - b^2)^(3/2)*(a*c*d
*e^2 - a*b*e^3 - ((3*b^2*e - 12*a*c*e)*(((3*b^2*e - 12*a*c*e)*(72*a*b*c^2*e - 36*a*c^3*d + (54*a*b*c^3*(3*b^2*
e - 12*a*c*e))/(36*a*c^2 - 9*b^2*c)))/(2*(36*a*c^2 - 9*b^2*c)) + 15*a*b*c*e^2 - 12*a*c^2*d*e))/(2*(36*a*c^2 -
9*b^2*c)) + ((((b*e - 2*c*d)*(72*a*b*c^2*e - 36*a*c^3*d + (54*a*b*c^3*(3*b^2*e - 12*a*c*e))/(36*a*c^2 - 9*b^2*
c)))/(6*c*(4*a*c - b^2)^(1/2)) + (9*a*b*c^2*(3*b^2*e - 12*a*c*e)*(b*e - 2*c*d))/((36*a*c^2 - 9*b^2*c)*(4*a*c -
 b^2)^(1/2)))*(b*e - 2*c*d))/(6*c*(4*a*c - b^2)^(1/2)) + (3*a*b*c*(3*b^2*e - 12*a*c*e)*(b*e - 2*c*d)^2)/(2*(36
*a*c^2 - 9*b^2*c)*(4*a*c - b^2))))/(a^2*c*(b^3*e^3 - 8*c^3*d^3 + 12*b*c^2*d^2*e - 6*b^2*c*d*e^2)) - (4*x^3*((b
*(b^2*e^3 + c^2*d^2*e + ((3*b^2*e - 12*a*c*e)*(6*c^3*d^2 + ((3*b^2*e - 12*a*c*e)*(45*b^2*c^2*e - 36*b*c^3*d +
(27*b^2*c^3*(3*b^2*e - 12*a*c*e))/(36*a*c^2 - 9*b^2*c)))/(2*(36*a*c^2 - 9*b^2*c)) + 12*b^2*c*e^2 - 18*b*c^2*d*
e))/(2*(36*a*c^2 - 9*b^2*c)) - 2*b*c*d*e^2 - ((((b*e - 2*c*d)*(45*b^2*c^2*e - 36*b*c^3*d + (27*b^2*c^3*(3*b^2*
e - 12*a*c*e))/(36*a*c^2 - 9*b^2*c)))/(6*c*(4*a*c - b^2)^(1/2)) + (9*b^2*c^2*(3*b^2*e - 12*a*c*e)*(b*e - 2*c*d
))/(2*(36*a*c^2 - 9*b^2*c)*(4*a*c - b^2)^(1/2)))*(b*e - 2*c*d))/(6*c*(4*a*c - b^2)^(1/2)) - (3*b^2*c*(3*b^2*e
- 12*a*c*e)*(b*e - 2*c*d)^2)/(4*(36*a*c^2 - 9*b^2*c)*(4*a*c - b^2))))/(4*a^2*c) - ((2*a*c - b^2)*(((3*b^2*e -
12*a*c*e)*(((b*e - 2*c*d)*(45*b^2*c^2*e - 36*b*c^3*d + (27*b^2*c^3*(3*b^2*e - 12*a*c*e))/(36*a*c^2 - 9*b^2*c))
)/(6*c*(4*a*c - b^2)^(1/2)) + (9*b^2*c^2*(3*b^2*e - 12*a*c*e)*(b*e - 2*c*d))/(2*(36*a*c^2 - 9*b^2*c)*(4*a*c -
b^2)^(1/2))))/(2*(36*a*c^2 - 9*b^2*c)) - (b^2*(b*e - 2*c*d)^3)/(4*(4*a*c - b^2)^(3/2)) + ((b*e - 2*c*d)*(6*c^3
*d^2 + ((3*b^2*e - 12*a*c*e)*(45*b^2*c^2*e - 36*b*c^3*d + (27*b^2*c^3*(3*b^2*e - 12*a*c*e))/(36*a*c^2 - 9*b^2*
c)))/(2*(36*a*c^2 - 9*b^2*c)) + 12*b^2*c*e^2 - 18*b*c^2*d*e))/(6*c*(4*a*c - b^2)^(1/2))))/(4*a^2*c*(4*a*c - b^
2)^(1/2)))*(4*a*c - b^2)^(3/2))/(b^3*e^3 - 8*c^3*d^3 + 12*b*c^2*d^2*e - 6*b^2*c*d*e^2) + ((2*a*c - b^2)*(4*a*c
 - b^2)*(((3*b^2*e - 12*a*c*e)*(((b*e - 2*c*d)*(72*a*b*c^2*e - 36*a*c^3*d + (54*a*b*c^3*(3*b^2*e - 12*a*c*e))/
(36*a*c^2 - 9*b^2*c)))/(6*c*(4*a*c - b^2)^(1/2)) + (9*a*b*c^2*(3*b^2*e - 12*a*c*e)*(b*e - 2*c*d))/((36*a*c^2 -
 9*b^2*c)*(4*a*c - b^2)^(1/2))))/(2*(36*a*c^2 - 9*b^2*c)) + ((b*e - 2*c*d)*(((3*b^2*e - 12*a*c*e)*(72*a*b*c^2*
e - 36*a*c^3*d + (54*a*b*c^3*(3*b^2*e - 12*a*c*e))/(36*a*c^2 - 9*b^2*c)))/(2*(36*a*c^2 - 9*b^2*c)) + 15*a*b*c*
e^2 - 12*a*c^2*d*e))/(6*c*(4*a*c - b^2)^(1/2)) - (a*b*(b*e - 2*c*d)^3)/(2*(4*a*c - b^2)^(3/2))))/(a^2*c*(b^3*e
^3 - 8*c^3*d^3 + 12*b*c^2*d^2*e - 6*b^2*c*d*e^2)))*(b*e - 2*c*d))/(3*c*(4*a*c - b^2)^(1/2))